﻿<UserControl x:Class="OfficeBusiness.View.WorksView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <DataGrid Grid.Row="0" ItemsSource="{Binding Path=WorksData}" SelectedItem="{Binding Path=SelectedItem}"
                  AlternatingRowBackground="LightBlue" Background="Cyan" BorderThickness="2" BorderBrush="Blue" Foreground="Blue"></DataGrid>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="0" Command="{Binding Path=CreateCommand}">Creat row</Button>
            <Button Grid.Column="1" Command="{Binding Path= RefreshCommand}">Refresh</Button>
            <Button Grid.Column="2" Command="{Binding Path=UpdateCommand}">Update</Button>
            <Button Grid.Column="3" Command="{Binding Path= DeleteRowCommand}">Delete row</Button>
        </Grid>
    </Grid>
</UserControl>
